package com.dpiinc.TechPage.constants

/**
 * 笔记状态
 * Created by X on 2018/7/25.
 */
enum class NoteState(val value: Int) {
    SYNCHRONIZED(0),
    NOT_SYNCHRONIZED(1),
    SYNCHRONIZE_FAILED(2);

    companion object {
        fun parse(value: Int): NoteState {
            return when (value) {
                0 -> NoteState.SYNCHRONIZED
                1 -> NoteState.NOT_SYNCHRONIZED
                2 -> NoteState.SYNCHRONIZE_FAILED
                else -> NoteState.SYNCHRONIZED
            }
        }
    }

}